//package com.daocao.hua.impl;
//
//import android.content.Context;
//
//import com.daocao.hua.constant.Const;
//import com.daocao.hua.http.CallBackListener;
//import com.daocao.hua.http.InterfaceServer;
//import com.daocao.hua.http.InfoCallBack;
//import com.daocao.hua.interfaces.OpinionInfo;
//import com.daocao.hua.http.ResponseListener;
//import com.daocao.hua.model.OpinionModel;
//import com.daocao.hua.model.RequestModel;
//import com.daocao.hua.model.ResponseModel;
//import com.daocao.hua.util.JsonUtil;
//
//import java.util.HashMap;
//import java.util.Map;
//
///**
// * 意见与建议数据
// * Created by Master.Dong on 2016/4/13.
// */
//public class OpinionInfoImpl implements OpinionInfo {
//
//    @Override
//    public void getOpinionInfo(final Context mContext, String type, String content, String photo, final InfoCallBack callBack) {
//        Map<String, Object> mapData = new HashMap<String, Object>();
//        mapData.put("type", type);
//        mapData.put("content", content);
//        mapData.put("photo", photo);
//        mapData.put("from", "Android");
//        RequestModel model = new RequestModel(mapData);
//
//        InterfaceServer.getInstance(mContext.getApplicationContext()).requestInterface(Const.SUGGESTION, Const.RequestMethod.POST, model,Const.DEFAULT_TIMEOUT, new CallBackListener<ResponseModel>(ResponseModel.class,callBack));
////                new ResponseListener() {
////            @Override
////            public void onStartInMainThread(Object result) {
////                callBack.onFailure(result.toString());
////            }
////
////            @Override
////            public void onFinishInMainThread(Object result) {
////            }
////
////            @Override
////            public Object onSuccessInRequestThread(int statusCode, String content) {
////                try {
////                    return JsonUtil.<ResponseModel>fromJson(content, ResponseModel.class);
////                } catch (Exception e) {
////                    return null;
////                }
////            }
////
////            @Override
////            public void onSuccessInMainThread(int statusCode, String content, Object result) {
////                try {
////                    ResponseModel model = (ResponseModel) result;
////
////                    callBack.onSuccess(model.getMsg());
////                    //返回数据接口
////                } catch (Exception e) {
////                    e.printStackTrace();
////                }
////            }
////        });
//    }
//
//    @Override
//    public void getOpinionTypeInfo(Context mContext, final InfoCallBack callBack) {
//        Map<String, Object> mapData = new HashMap<String, Object>();
//        RequestModel model = new RequestModel(mapData);
//
//        InterfaceServer.getInstance(mContext.getApplicationContext()).requestInterface(Const.SUGGESTION_TYPE, Const.RequestMethod.POST, model,Const.DEFAULT_TIMEOUT, new CallBackListener<OpinionModel>(OpinionModel.class,callBack));
////                new ResponseListener() {
////            @Override
////            public void onStartInMainThread(Object result) {
////                callBack.onFailure(result.toString());
////            }
////
////            @Override
////            public void onFinishInMainThread(Object result) {
////            }
////
////            @Override
////            public Object onSuccessInRequestThread(int statusCode, String content) {
////                try {
////                    return JsonUtil.<OpinionModel>fromJson(content, OpinionModel.class);
////                } catch (Exception e) {
////                    return null;
////                }
////            }
////
////            @Override
////            public void onSuccessInMainThread(int statusCode, String content, Object result) {
////                try {
////                    OpinionModel model = (OpinionModel) result;
////                    if (model.getStatus() == 1)
////                        callBack.onSuccess(model);
////                    else callBack.onFailure(model.getMsg());
////                    //返回数据接口
////                } catch (Exception e) {
////                    e.printStackTrace();
////                }
////            }
////        });
//    }
//
//}
